﻿using System.Windows.Controls;
using System.Windows.Input;
using GestorDocument.ViewModel.DashBoard;


namespace GestorDocument.UI.DashBoard
{
    /// <summary>
    /// Lógica de interacción para Tablero2View.xaml
    /// </summary>
    public partial class Tablero2View : UserControl
    {
        public Tablero2View()
        {
            InitializeComponent();
            TableroViewModel vm = new TableroViewModel();
            
            this.DataContext = vm;
            this.anioMesView1.DataContext = vm.CombosAnioMesViewModel;            

            this.TodosGraphView.init(vm.TodosGraphViewModel,vm.CombosAnioMesViewModel,vm.TodosDBTViewModel);
            this.TodosGraphView.Refresh(vm.TodosGraphViewModel);
                        
            this.IndicadorAtendidos.DataContext = vm.TableroAtendidosViewModel;
            this.IndicadorPendientes.DataContext = vm.TableroPendientesViewModel;

            this.TodosDBTView.DataContext = vm.TodosDBTViewModel;
            
        }

        private void FilterImg_MouseEnter(object sender, MouseEventArgs e)
        {
            FilterPopup.IsOpen = true;
        }

        private void Border_MouseLeave(object sender, MouseEventArgs e)
        {
            FilterPopup.IsOpen = false;
        }

    }
}
